package testJdk.reflectDemo.bean;

import lombok.Data;

/**
 * @version 1.0.0
 * Created by cyd on 2024-07-29 10:27:28
 * @ClassName : testJdk.reflectDemo.bean.Employee
 * @Description : 类描述
 */

public class Employee {

    private String name;
    private Integer age;

    public Employee() {
    }

    public Employee(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    protected Employee(Integer age) {
        this.age = age;
    }

    private Employee(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    private void play(Integer hour) {
        System.out.println(this.name + "玩了" + hour + "小时");
    }

    @Override
    public String toString() {
        return "Employee{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
